<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数组静态方法_Array.isArray()</title>
</head>

<body>

</body>

</html>
<script>
    /*
    Array.isArray方法返回一个布尔值，表示参数是否为数组。它可以弥补typeof运算符的不足
    */ 

   var num = 10;
   console.log(typeof num) //number

   var arr = [1,2,3,4,5]
   console.log(typeof arr) //object
   console.log(Array.isArray(arr)) //true 是数组
   console.log(Array.isArray(num)) //false 不是数组
</script>